package com.ceba.test.task.listener;


import javax.servlet.ServletContextEvent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ceba.test.task.MissionTasks;
import com.ceba.test.task.start.SystemStartWork;



public class MissionListener implements javax.servlet.ServletContextListener{

	static Logger logger = LoggerFactory.getLogger(MissionListener.class);

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		MissionTasks.stop();
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		logger.debug("加载定时任务--");
		SystemStartWork.start();
		MissionTasks.run();
	}
}
